Skip to content

Fix null constraint columns in add-foreign-keys template#962

Merged
markstory merged 1 commit into4.xfrom
fix-null-foreign-key-columns
Nov 22, 2025
Merged

Fix null constraint columns in add-foreign-keys template#962
markstory merged 1 commit into4.xfrom
fix-null-foreign-key-columns

Conversation

@dereuromark
Copy link
Copy Markdown
Member

Summary

  • Fix Twig runtime error when constraint['columns'] is null during migration snapshot generation
  • Add default([]) filter before sort to handle null values gracefully

Fixes #961

Test plan

  • Run bin/cake bake migration_snapshot on a database that previously triggered the null constraint error
  • Verify existing snapshot generation still works correctly

🤖 Generated with Claude Code

Add default([]) filter before sort to handle cases where
constraint['columns'] may be null, preventing Twig runtime errors
during migration snapshot generation.

Fixes #961

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@markstory markstory merged commit 35750c5 into 4.x Nov 22, 2025
13 checks passed
@markstory markstory deleted the fix-null-foreign-key-columns branch November 22, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error while trying to create a migration_snapshot

2 participants